Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLUE-209 Db perf #68

Merged
merged 6 commits into from
Sep 2, 2024
Merged

BLUE-209 Db perf #68

merged 6 commits into from
Sep 2, 2024

Conversation

jairajdev
Copy link
Contributor

No description provided.

`The account verification failed from robustQuery nodes ${receipt.tx.txId} , ${receipt.cycle}, ${receipt.tx.timestamp}`
)
continue
if (config.verifyAccountData) {

Check failure

Code scanning / CodeQL

User-controlled bypass of security check High

This condition guards a sensitive
action
, but a
user-provided value
controls it.
`The receipt validation failed from robustQuery nodes ${receipt.tx.txId} , ${receipt.cycle}, ${receipt.tx.timestamp}`
)
continue
if (config.verifyReceiptData) {

Check failure

Code scanning / CodeQL

User-controlled bypass of security check High

This condition guards a sensitive
action
, but a
user-provided value
controls it.
const existingReceipt = await Receipt.queryReceiptByReceiptId(txId)
const failedReasons = []
const nestedCounterMessages = []
if (config.verifyAppReceiptData) {

Check failure

Code scanning / CodeQL

User-controlled bypass of security check High

This condition guards a sensitive
action
, but a
user-provided value
controls it.
return { success: false, failedReasons, nestedCounterMessages }
}
}
if (config.verifyAccountData) {

Check failure

Code scanning / CodeQL

User-controlled bypass of security check High

This condition guards a sensitive
action
, but a
user-provided value
controls it.
return { success: false, failedReasons, nestedCounterMessages }
}
}
if (config.verifyReceiptSignaturesSeparately) {

Check failure

Code scanning / CodeQL

User-controlled bypass of security check High

This condition guards a sensitive
action
, but a
user-provided value
controls it.
}

const createDB = async (dbPath: string, dbName: string): Promise<Database> => {
console.log('dbName', dbName, 'dbPath', dbPath)

Check warning

Code scanning / CodeQL

Log injection Medium

Log entry depends on a
user-provided value
.
worker.kill()
}
if (receiptLoadTraker < config.receiptLoadTrakerLimit) {
console.log(`Receipt load is below the limit: ${receiptLoadTraker}/${config.receiptLoadTrakerLimit}`)

Check warning

Code scanning / CodeQL

Log injection Medium

Log entry depends on a
user-provided value
.
}, based on ${receiptLoadTraker} receipts received.`
)
receiptLoadTraker = 0 // Reset the count
}, config.receiptLoadTrakerInterval)

Check failure

Code scanning / CodeQL

Resource exhaustion High

This creates a timer with a user-controlled duration from a
user-provided value
.
process.send({ type: 'child_ready' })
setInterval(() => {
console.log(
`lastActivityCheckTimeout: ${config.lastActivityCheckTimeout}, lastActivityCheckInterval: ${config.lastActivityCheckInterval}`

Check warning

Code scanning / CodeQL

Log injection Medium

Log entry depends on a
user-provided value
.
console.log(`Worker ${process.pid} is idle for more than 1 minute`)
process.send({ type: 'child_close' })
}
}, config.lastActivityCheckInterval)

Check failure

Code scanning / CodeQL

Resource exhaustion High

This creates a timer with a user-controlled duration from a
user-provided value
.

function createDirectories(pathname: string): void {
const __dirname = path.resolve()
pathname = pathname.replace(/^\.*\/|\/?[^/]+\.[a-z]+|\/$/g, '') // Remove leading directory markers, and remove ending /file-name.extension

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
a user-provided value
may run slow on strings with many repetitions of '.'.
@jairajdev jairajdev changed the title Db perf BLUE-209 Db perf Sep 1, 2024
@mhanson-github mhanson-github merged commit 658c72a into dev Sep 2, 2024
5 of 7 checks passed
@mhanson-github mhanson-github deleted the db-perf branch September 5, 2024 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants